interface IAnimal {
  // 属性
  name: string;
  age: number;

  // 方法
  makeSound(): void;
}

interface IGame {
  dazhao(): void;
}

export class Dog implements IAnimal, IGame {
  name: string;
  age: number;
  breed: string;

  constructor(name: string, age: number, breed: string) {
    this.name = name;
    this.age = age;
    this.breed = breed;
  }

  makeSound(): void {
    console.log("wang wang wang");
  }

  dazhao(): void {
    console.log("dazhao");
  }
}

const dog = new Dog("doggie", 3, "金毛");
dog.makeSound();
dog.dazhao();
